package org.example;

import org.example.subsystem.AirportSubsystem;
import org.example.subsystem.HotelsSubsystem;
import org.example.subsystem.RestaurantsSubsystem;
import org.example.subsystem.SubSystem;

public class Bureau {

    public static void main(String[] args) {
        Mediator mediator = new Mediator();
        SubSystem system0 = new RestaurantsSubsystem("餐厅子系统");
        SubSystem system1 = new AirportSubsystem("机场子系统");
        SubSystem system2 = new HotelsSubsystem("酒店子系统");
        mediator.register(system0);
        mediator.register(system1);
        mediator.register(system2);

        system0.sendMessage(system1, "顾客餐饮信息");
        system1.sendMessage(system2, "登记信息");
        system2.sendMessage(system0, "酒店入住信息");

        mediator.sendMessage(system0, "暂停营业通知");

    }
}